//
//  RFIXAPIForDebugPlugin.h
//  OCSEngine
//
//  Created by bill bai on 2023/11/22.
//  Copyright © 2023 Tencent. All rights reserved.
//

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// 本文件内的所有 API 仅供 RAFTKit Debug 插件使用
// 请不要擅自使用，后果自负
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#ifndef RFIXAPIForDebugPlugin_h
#define RFIXAPIForDebugPlugin_h

#import <Foundation/Foundation.h>

FOUNDATION_EXPORT void XFRDebugAPI_SetDebugResourceRelativePath(NSString *path);
FOUNDATION_EXPORT NSString *XFRDebugAPI_GetDebugResourceRelativePath(void);

FOUNDATION_EXPORT NSUInteger XFRDebugAPI_GetReuqestSequence(void);

FOUNDATION_EXPORT BOOL XFRDebugAPI_IsDebugResourceEnabled(void);
FOUNDATION_EXPORT void XFRDebugAPI_SetDebugResourceEnabled(BOOL enabled);

FOUNDATION_EXPORT void XFRDebugAPI_AddObserverForReqestDataAndResponseData(id observer);
FOUNDATION_EXPORT void XFRDebugAPI_RemoveObserverForReqestDataAndResponseData(id observer);

FOUNDATION_EXPORT BOOL XFRDebugAPI_IsSDKInitialized(void);

FOUNDATION_EXPORT void XFRDebugAPI_SetEnableCheckVersionFile(BOOL enableCheckVersionFile);
FOUNDATION_EXPORT BOOL XFRDebugAPI_IsCheckVersionFileEnabled(void);

FOUNDATION_EXPORT NSString *XFRDebugAPI_UnregisteredSymbolDescription(void);
FOUNDATION_EXPORT NSUInteger XFRDebugAPI_UnregisteredSymbolCount(void);

extern NSString * const kXFRResourcePathKey;
extern NSString * const kXFRResourceTypeKey;
extern NSString * const kXFRResourceAppBundleIdKey;
extern NSString * const kXFRResourceAppVersionKey;
extern NSString * const kXFRResourceVersionIDKey;
extern NSString * const kXFRResourceLocalPathKey;
extern NSString * const kXFRResourcePathKey;
FOUNDATION_EXPORT NSDictionary<NSString *, NSString *> *XFRDebugAPI_GetSDKInitResource(void);

FOUNDATION_EXPORT NSUInteger XFRDebugAPI_GetLoadResult(void);

FOUNDATION_EXPORT NSString *XFRDebugAPI_DecryptAndUnzipInitResource(void);
FOUNDATION_EXPORT NSString *XFRDebugAPI_DecryptAndUnzipUserResourceAtPath(NSString *path);

FOUNDATION_EXPORT NSString *XFRDebugAPI_GetSDKConfigVersion(void);
FOUNDATION_EXPORT NSString *XFRDebugAPI_GetResourceInfoPathForConfigVersion(NSString *configVersion);

FOUNDATION_EXPORT NSString *XFRDebugAPI_GetLastReportConfigID(void);
FOUNDATION_EXPORT NSString *XFRDebugAPI_GetLastReportDownloadID(void);
FOUNDATION_EXPORT NSString *XFRDebugAPI_GetLastReportLoadID(void);

FOUNDATION_EXPORT NSString *XFRDebugAPI_GetBuglyStoredVersion(void);

FOUNDATION_EXPORT NSNumber *XFRDebugAPI_GetSafeModeLoadCounter(void);
FOUNDATION_EXPORT NSNumber *XFRDebugAPI_GetSafeModeWindowCounter(void);
FOUNDATION_EXPORT NSArray<NSNumber *> *XFRDebugAPI_GetSafeModeCrashTimestamps(void);

FOUNDATION_EXPORT NSDictionary *XFRDebugAPI_GetRealtimeReporterData(void);
FOUNDATION_EXPORT NSDictionary *XFRDebugAPI_GetSafeModeData(void);

extern NSString * const kXFRSDKConfigAppIDKey;
extern NSString * const kXFRSDKConfigAppKeyKey;
extern NSString * const kXFRSDKConfigAppVersionKey;
extern NSString * const kXFRSDKConfigUIDKey;
extern NSString * const kXFRSDKConfigDeviceIDKey;
extern NSString * const kXFRSDKConfigEnvironmentDKey;
extern NSString * const kXFRSDKConfigSystemVersionKey;
extern NSString * const kXFRSDKConfigEventTypeKey;
extern NSString * const kXFRSDKConfigConfigVersionKey;

FOUNDATION_EXPORT NSDictionary<NSString *, NSString *> *XFRDebugAPI_GetSDKConfigData(void);

FOUNDATION_EXPORT void XFRDebugAPI_DebugRequestSettingAndDownload(void);

FOUNDATION_EXPORT void XFRDebugAPI_SetSDKConfigDataAppVersion(NSString *appVersion);
FOUNDATION_EXPORT void XFRDebugAPI_SetSDKConfigDataSystemVersion(NSString *systemVersion);
FOUNDATION_EXPORT void XFRDebugAPI_SetSDKConfigDataUID(NSString *uid);

FOUNDATION_EXPORT void XFRDebugAPI_SynchronizeSDKConfigData(void);

FOUNDATION_EXPORT NSString *XFRDebugAPI_GetReuqestDataJSON(void);

FOUNDATION_EXPORT NSString *XFRDebugAPI_GetRequestDataDescription(void);
FOUNDATION_EXPORT NSString *XFRDebugAPI_GetResponseDataDescription(void);

#endif /* RFIXAPIForDebugPlugin_h */
